package cn.demo.Controller;

import cn.demo.pojo.User;
import cn.demo.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {
    @Autowired
    private UserService userService;
    public void addUser(){
        User user =new User();
        user.setId(101);
        user.setName("春节愉快");
        user.setAge(2022);
        user.setSex("男");
        userService.addUser(user);
    }
}
